package com.zyy.smartcity1129.violation;

import android.view.View;
import android.widget.TextView;

import com.zyy.smartcity1129.BaseFragment;
import com.zyy.smartcity1129.R;
import com.zyy.smartcity1129.data.ViolationRecordInfo;

/**
 * @ClassName: ViolationDetailedFragment$
 * @Description: 作用
 * @Author: letquit
 * @CreateDate: 7/12/2021$
 * @Version: 1.0
 */
public class ViolationDetailedFragment extends BaseFragment {
    private ViolationRecordInfo.RowsBean violation = ViolationRecordFragment.violation;
    private TextView textView2;
    private TextView textView3;
    private TextView textView4;
    private TextView textView5;
    private TextView textView6;
    private TextView textView7;
    private TextView textView8;
    private TextView textView9;

    @Override
    protected int layId() {
        return R.layout.f_account;
    }

    @Override
    protected String title() {
        return "违法详情";
    }

    @Override
    protected boolean back() {
        return true;
    }

    @Override
    protected Boolean bottom() {
        return false;
    }

    @Override
    protected void init(View iv) {
        initView(iv);
        textView2.setText("违法时间：" + violation.getBadTime());
        textView3.setText("违法地点：" + violation.getIllegalSites());
        textView4.setText("违法行为：" + violation.getTrafficOffence());
        textView5.setText("通知书号：" + violation.getNoticeNo());
        textView6.setText("违章记分：" + violation.getDeductMarks() + "分");
        textView7.setText("罚款金额：" + violation.getMoney() + "元");
    }

    private void initView(View iv) {
        textView2 = (TextView) iv.findViewById(R.id.textView2);
        textView3 = (TextView) iv.findViewById(R.id.textView3);
        textView4 = (TextView) iv.findViewById(R.id.textView4);
        textView5 = (TextView) iv.findViewById(R.id.textView5);
        textView6 = (TextView) iv.findViewById(R.id.textView6);
        textView7 = (TextView) iv.findViewById(R.id.textView7);
        textView8 = (TextView) iv.findViewById(R.id.textView8);
        textView9 = (TextView) iv.findViewById(R.id.textView9);
        textView8.setVisibility(View.GONE);
        textView9.setVisibility(View.GONE);
    }
}
